/*
 * Josh Lindoo
 * Login ID : lind6441
 * CS-102, Winter 2013
 * Programming Assignment 4
 * TreeNode class: Basic node for a binary search tree
 */

public class TreeNode<T> {
	
	private T datum;
	private TreeNode<T> leftNode;
	private TreeNode<T> rightNode;
	
	TreeNode() {
		datum = null;
		leftNode = null;
		rightNode = null;
	}
	
	public T getDatum() {
		return datum;
	}

	public TreeNode<T> getLeft() {
		return leftNode;
	}

	public TreeNode<T> getRight() {
		return rightNode;
	}
	
	public void setDatum(T newDatum) {
		datum = newDatum;
	}
	
	public void setLeft(TreeNode<T> node) {
		leftNode = node;
	}
	
	public void setRight(TreeNode<T> node) {
		rightNode = node;
	}
	
}
